<me:UIWBDAT x:Class="WPFExcelReport.TWB04"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
                     xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT" 
                    xmlns:WS="clr-namespace:WPFExcelReport;assembly=TWASTAMM" 
                    xmlns:WF="clr-namespace:WPFExcelReport;assembly=TWAFARBEN"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                  x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIWBDAT.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/> 
        <ucd:Divideby1000  x:Key="d1000"/>  
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>  
    </me:UIWBDAT.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
            <WrapPanel>  
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button Click="DeleteCommand" Height="20" Margin="5,0,0,0" Width="24" >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/Delete.png" />
                        </Button.Background>
                    </Button>  
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button   Click="SaveCommand" Height="20" Margin="5,0,0,0" Width="24" >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/button_ok.png" />
                        </Button.Background>
                    </Button> 
                </Grid>
                
                    <Button  Click="EditCommand" Width="24" Height="20" Visibility="{Binding IsMaster,Converter={StaticResource bv}}" >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/Extend.png" />
                        </Button.Background>
                    </Button>
                
            </WrapPanel>
            <WrapPanel>
              
                    <Button   Click="NewCommand" Height="20" Margin="5,0,0,0" Width="24" >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/Add.png" />
                        </Button.Background>
                    </Button>
                 
                <Grid Margin="10,0,0,0"  VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="{Binding Source={Localization:Translate Word=库}}"/>
                    <ex:TXT72 Grid.Column="1"  Text="{Binding LO,ElementName=TV}" Width="24" />
                </Grid>
                <Grid Margin="10,0,0,0"  VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                     </Grid.ColumnDefinitions>
                    <WS:TSWS02 Name="cWS02" Grid.Column="0" dwWS="{Binding dwWS,ElementName=TV}"  />
                 </Grid>
                <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                     </Grid.ColumnDefinitions>
                    <WF:TSWS06 Grid.Column="0" dwWS="{Binding dwWS,ElementName=cWS02}" dwWF="{Binding dwWF,ElementName=TV}" />
                    <TextBlock Grid.Column="1" Text="{Binding CART,ElementName=TV}" FontSize="18"  Width="Auto"></TextBlock>
                    <TextBlock Grid.Column="2" Text="{Binding CFARBE,ElementName=TV}" FontSize="18" Width="Auto"></TextBlock>
                 </Grid>
                <Grid Margin="10,0,0,0" VerticalAlignment="Top"  >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition> 
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="{Binding Source={Localization:Translate Word=卡号}}"/>
                    <TextBlock Grid.Column="1" Text="{Binding WBRWKRS,ElementName=TV}" Width="24"></TextBlock>
                    <TextBlock Grid.Column="2" Text="{Binding WBRWLFD,ElementName=TV}" Width="80"></TextBlock>
                </Grid> 
                <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=匹数}}"   FontSize="18"></TextBlock>
                    <TextBlock Grid.Column="1" Text="{Binding WBSTK,Source={StaticResource vwMaster}}" FontSize="18"  Width="30" ></TextBlock>
                </Grid>
                <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=长度}}" ></TextBlock>
                    <TextBlock Grid.Column="1" Text="{Binding WBMTR,Source={StaticResource vwMaster},Converter={StaticResource d100}}" FontSize="18" Width="80" ></TextBlock>
                </Grid> 
            </WrapPanel>
        </StackPanel> 
    </Grid>
</me:UIWBDAT>
